<?php include("include.php");?>
<?php
	$numSol = (int) $_POST['NUM_SOLUTION'];
	$jobid = $_POST['jobid']; 
	$job = job::getJobById($jobid);
	$rtype = ressourcetype::getRessourceTypeById($_POST['ressourcetype_id']);
	$rext = ressourceext::getRessourceExtById($_POST['ressourceext_id']);
	$job->setRessourceType($rtype);
	$job->setRessourceExt($rext);
	$job->save();
	jobsolution::deleteJobSolutionByJobId($jobid);
	for($i=1;$i<=$numSol;$i++){
		jobsolution::createJobSolution($jobid,$_POST['solution_'.$i],$i);
	}
?>
<meta http-equiv="REFRESH" content="0;url=jobQuarks.php?jid=<?php echo $jobid;?>">
<?php include("includes/footer.php");?>